package hong.jun.dao;


import dev.morphia.Datastore;
import dev.morphia.dao.BasicDAO;
import hong.jun.MongoMgr;
import hong.jun.data.role.Role;


/**
 * 
 * @author zhaowei
 *
 */

public class RoleDao extends BasicDAO<Role, Long> {
	private static RoleDao dao = creatDao();

	public RoleDao(Class<Role> entityClass, Datastore ds) {
		super(entityClass, ds);
	}

	public static RoleDao creatDao() {
		Datastore datastore = MongoMgr.getInstance().getDatastore();
        return new RoleDao(Role.class, datastore);
	}
	public static RoleDao getInstance(){
		return dao;
	}
}
